|
Install BIND
2015/12/02 |
|
Install BIND to configure DNS server which resolves domain name or IP address. BIND uses 53/TCP,UDP.
|
|
| [1] | Install BIND. |
|
dlp:~ # zypper -n install bind bind-utils
|
| [2] | Configure BIND This example is done with grobal IP address [172.16.0.80/29], Private IP address [10.0.0.0/24], Domain name [srv.world]. However, Please use your own IPs and domain name when you set config on your server. ( Actually, [172.16.0.80/29] is for private IP address, though. ) |
|
dlp:~ # mv /etc/named.conf /etc/named.conf.org
dlp:~ #
vi /etc/named.conf # create new
options {
directory "/var/lib/named";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
# for the case to listen IPv4 ports
listen-on port 53 { any; };
# for the case to listen IPv6 ports
listen-on-v6 { any; };
# query range ( set internal server and so on )
allow-query { 127.0.0.1; 10.0.0.0/24; };
# transfer range ( set it if you have secondary DNS )
allow-transfer { 127.0.0.1; 10.0.0.0/24; };
recursion yes;
};
view "internal" {
match-clients {
localhost;
10.0.0.0/24;
};
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "127.0.0.zone";
};
zone "srv.world" in {
type master;
file "srv.world.lan";
allow-update { none; };
};
zone "0.0.10.in-addr.arpa" in {
type master;
file "0.0.10.db";
allow-update { none; };
};
};
view "external" {
match-clients { any; };
allow-query { any; };
recursion no;
zone "srv.world" in {
type master;
file "srv.world.wan";
allow-update { none; };
};
zone "80.0.16.172.in-addr.arpa" in {
type master;
file "80.0.16.172.db";
allow-update { none; };
};
};
# allow-query
# For How to write for "***.in-addr.arpa", Write network address reversely like follows⇒ query range you permit # allow-transfer ⇒ the range you permit to transfer zone info # recursion ⇒ allow or not to search recursively # view "internal" { *** }; ⇒ write for internal definition # view "external" { *** }; ⇒ write for external definition
# 10.0.0.0/24 # network address ⇒ 10.0.0.0 # range of network ⇒ 10.0.0.0 - 10.0.0.255
# How to write
# 172.16.0.80/29⇒ 0.0.10.in-addr.arpa # network address ⇒ 172.16.0.80 # range of network ⇒ 172.16.0.80 - 172.16.0.87 # How to write ⇒ 80.0.16.172.in-addr.arpa
|